package com.example.recruitment_website.controller;

import com.example.recruitment_website.domain.KeyWords;
import com.example.recruitment_website.domain.WorkInfo;
import com.example.recruitment_website.service.KeyWordsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
@Slf4j
@RestController
public class KeyWordsController {
    @Autowired
    KeyWordsService keyWordsService;

    @GetMapping("/hotKey")
    public HashMap findHotKey(){
        List<KeyWords> testList = keyWordsService.findHotKey();
        HashMap<String,Object> map = new HashMap<>();
        map.put("data",testList.subList(0,10));
        map.put("msg","请求成功");
        map.put("code",0);
        return map;
    }
}
